function DecoderFactory()
{
}
DecoderFactory.prototype.judgeSubtitleType=function(filePath)
{
	var tmpString=filePath.split('.');
	return tmpString[1];
}
DecoderFactory.prototype.createDecoderByType=function(type)
{
	
	if(type=="srt")
		return new SRTSubtitleDecoder();
	else if(type=="ssa")
		return new SSASubtitleDecoder();
	else 
		document.write("can't decode this type");
}
DecoderFactory.prototype.createDecoder=function(filePath)
{
	var fileType=this.judgeSubtitleType(filePath);
	var decoder;
	if(fileType=="srt")
		return new SRTSubtitleDecoder(filePath);
	else if(fileType=="ssa")
		return new SSASubtitleDecoder(filePath);
	else 
		document.write("can't decode this type");
}
